<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: RubyMotionQuery::Event
  
    &mdash; Documentation by YARD 0.8.7.3
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!" + escape(window.location.href);
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (E)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../RubyMotionQuery.html" title="RubyMotionQuery (module)">RubyMotionQuery</a></span></span>
     &raquo; 
    <span class="title">Event</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: RubyMotionQuery::Event
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></span>
      
        <ul class="fullTree">
          <li><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></li>
          
            <li class="next">RubyMotionQuery::Event</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">motion/ruby_motion_query/event.rb</dd>
  
</dl>
<div class="clear"></div>


  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="CONTROL_EVENTS-constant" class="">CONTROL_EVENTS =
          
        </dt>
        <dd><pre class="code"><span class='lbrace'>{</span> 
  <span class='label'>touch:</span> <span class='const'>UIControlEventTouchUpInside</span><span class='comma'>,</span>
  <span class='label'>touch_up:</span> <span class='const'>UIControlEventTouchUpInside</span><span class='comma'>,</span>
  <span class='label'>touch_down:</span> <span class='const'>UIControlEventTouchDown</span><span class='comma'>,</span>
  <span class='label'>touch_start:</span> <span class='const'>UIControlEventTouchDown</span> <span class='op'>|</span> <span class='const'>UIControlEventTouchDragEnter</span><span class='comma'>,</span>
  <span class='label'>touch_stop:</span> <span class='const'>UIControlEventTouchUpInside</span> <span class='op'>|</span> <span class='const'>UIControlEventTouchCancel</span> <span class='op'>|</span> <span class='const'>UIControlEventTouchDragExit</span><span class='comma'>,</span>
  <span class='label'>change:</span>  <span class='const'>UIControlEventValueChanged</span> <span class='op'>|</span> <span class='const'>UIControlEventEditingChanged</span><span class='comma'>,</span>

  <span class='label'>touch_down_repeat:</span> <span class='const'>UIControlEventTouchDownRepeat</span><span class='comma'>,</span>
  <span class='label'>touch_drag_inside:</span> <span class='const'>UIControlEventTouchDragInside</span><span class='comma'>,</span>
  <span class='label'>touch_drag_outside:</span> <span class='const'>UIControlEventTouchDragOutside</span><span class='comma'>,</span>
  <span class='label'>touch_drag_enter:</span> <span class='const'>UIControlEventTouchDragEnter</span><span class='comma'>,</span>
  <span class='label'>touch_drag_exit:</span> <span class='const'>UIControlEventTouchDragExit</span><span class='comma'>,</span>
  <span class='label'>touch_up_inside:</span> <span class='const'>UIControlEventTouchUpInside</span><span class='comma'>,</span>
  <span class='label'>touch_up_outside:</span> <span class='const'>UIControlEventTouchUpOutside</span><span class='comma'>,</span>
  <span class='label'>touch_cancel:</span> <span class='const'>UIControlEventTouchCancel</span><span class='comma'>,</span>

  <span class='label'>value_changed:</span> <span class='const'>UIControlEventValueChanged</span><span class='comma'>,</span>

  <span class='label'>editing_did_begin:</span> <span class='const'>UIControlEventEditingDidBegin</span><span class='comma'>,</span>
  <span class='label'>editing_changed:</span> <span class='const'>UIControlEventEditingChanged</span><span class='comma'>,</span>
  <span class='label'>editing_did_change:</span> <span class='const'>UIControlEventEditingChanged</span><span class='comma'>,</span>
  <span class='label'>editing_did_end:</span> <span class='const'>UIControlEventEditingDidEnd</span><span class='comma'>,</span>
  <span class='label'>editing_did_endonexit:</span> <span class='const'>UIControlEventEditingDidEndOnExit</span><span class='comma'>,</span>

  <span class='label'>all_touch:</span> <span class='const'>UIControlEventAllTouchEvents</span><span class='comma'>,</span>
  <span class='label'>all_editing:</span> <span class='const'>UIControlEventAllEditingEvents</span><span class='comma'>,</span>

  <span class='label'>application:</span> <span class='const'>UIControlEventApplicationReserved</span><span class='comma'>,</span>
  <span class='label'>system:</span> <span class='const'>UIControlEventSystemReserved</span><span class='comma'>,</span>
  <span class='label'>all:</span> <span class='const'>UIControlEventAllEvents</span>
<span class='rbrace'>}</span></pre></dd>
      
        <dt id="VIEW_GESTURES-constant" class="">VIEW_GESTURES =
          
        </dt>
        <dd><pre class="code"><span class='lbrace'>{</span>
  <span class='label'>tap:</span> <span class='const'>UITapGestureRecognizer</span><span class='comma'>,</span>
  <span class='label'>pinch:</span> <span class='const'>UIPinchGestureRecognizer</span><span class='comma'>,</span>
  <span class='label'>rotate:</span> <span class='const'>UIRotationGestureRecognizer</span><span class='comma'>,</span>
  <span class='label'>swipe:</span> <span class='const'>UISwipeGestureRecognizer</span><span class='comma'>,</span>
  <span class='label'>pan:</span> <span class='const'>UIPanGestureRecognizer</span><span class='comma'>,</span>
  <span class='label'>long_press:</span> <span class='const'>UILongPressGestureRecognizer</span>
<span class='rbrace'>}</span></pre></dd>
      
    </dl>
  




  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#block-instance_method" title="#block (instance method)">- (Object) <strong>block</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute block.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#event-instance_method" title="#event (instance method)">- (Object) <strong>event</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute event.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#gesture-instance_method" title="#gesture (instance method)">- (Object) <strong>gesture</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute gesture.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#recognizer-instance_method" title="#recognizer (instance method)">- (Object) <strong>recognizer</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute recognizer.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#sdk_event_or_recognizer-instance_method" title="#sdk_event_or_recognizer (instance method)">- (Object) <strong>sdk_event_or_recognizer</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute sdk_event_or_recognizer.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#sender-instance_method" title="#sender (instance method)">- (Object) <strong>sender</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute sender.</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#gesture%3F-instance_method" title="#gesture? (instance method)">- (Boolean) <strong>gesture?</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#handle_gesture_or_event-instance_method" title="#handle_gesture_or_event (instance method)">- (Object) <strong>handle_gesture_or_event</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Event) <strong>initialize</strong>(sender, event, block) </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>A new instance of Event.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#location-instance_method" title="#location (instance method)">- (Object) <strong>location</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#location_in-instance_method" title="#location_in (instance method)">- (Object) <strong>location_in</strong>(view) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#remove-instance_method" title="#remove (instance method)">- (Object) <strong>remove</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#set_options-instance_method" title="#set_options (instance method)">- (Object) <strong>set_options</strong>(opts) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  

<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="RubyMotionQuery::Event (class)">Event</a></span></tt>) <strong>initialize</strong>(sender, event, block) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns a new instance of Event</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 5</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_sender'>sender</span><span class='comma'>,</span> <span class='id identifier rubyid_event'>event</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='ivar'>@sdk_event_or_recognizer</span> <span class='op'>=</span> <span class='const'>VIEW_GESTURES</span><span class='lbracket'>[</span><span class='id identifier rubyid_event'>event</span><span class='rbracket'>]</span>
    <span class='ivar'>@gesture</span> <span class='op'>=</span> <span class='kw'>true</span>
  <span class='kw'>elsif</span> <span class='id identifier rubyid_sender'>sender</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>UIControl</span><span class='rparen'>)</span>
    <span class='ivar'>@gesture</span> <span class='op'>=</span> <span class='kw'>false</span>
    <span class='ivar'>@sdk_event_or_recognizer</span> <span class='op'>=</span> <span class='const'>CONTROL_EVENTS</span><span class='lbracket'>[</span><span class='id identifier rubyid_event'>event</span><span class='rbracket'>]</span>
  <span class='kw'>end</span>

  <span class='kw'>if</span> <span class='ivar'>@sdk_event_or_recognizer</span>
    <span class='ivar'>@sender</span> <span class='op'>=</span> <span class='id identifier rubyid_sender'>sender</span>
    <span class='ivar'>@event</span> <span class='op'>=</span> <span class='id identifier rubyid_event'>event</span>
    <span class='ivar'>@block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>

    <span class='kw'>if</span> <span class='ivar'>@gesture</span>
      <span class='ivar'>@recognizer</span> <span class='op'>=</span> <span class='ivar'>@sdk_event_or_recognizer</span><span class='period'>.</span><span class='id identifier rubyid_alloc'>alloc</span><span class='period'>.</span><span class='id identifier rubyid_initWithTarget'>initWithTarget</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>action:</span> <span class='symbol'>:handle_gesture_or_event</span><span class='rparen'>)</span>
      <span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_addGestureRecognizer'>addGestureRecognizer</span><span class='lparen'>(</span><span class='ivar'>@recognizer</span><span class='rparen'>)</span>
    <span class='kw'>else</span>
      <span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_addTarget'>addTarget</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>action:</span> <span class='symbol'>:handle_gesture_or_event</span><span class='comma'>,</span> <span class='label'>forControlEvents:</span> <span class='ivar'>@sdk_event_or_recognizer</span><span class='rparen'>)</span>
    <span class='kw'>end</span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[RMQ Error]  Invalid event or gesture or invalid sender (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_event'>event</span><span class='rbrace'>}</span><span class='tstring_content'>). Example of use: button.on(:touch) { my_code }</span><span class='tstring_end'>&quot;</span></span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="block=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="block-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>block</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute block</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


3
4
5</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 3</span>

<span class='kw'>def</span> <span class='id identifier rubyid_block'>block</span>
  <span class='ivar'>@block</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="event=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="event-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>event</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute event</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


3
4
5</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 3</span>

<span class='kw'>def</span> <span class='id identifier rubyid_event'>event</span>
  <span class='ivar'>@event</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="gesture=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="gesture-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>gesture</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute gesture</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


3
4
5</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 3</span>

<span class='kw'>def</span> <span class='id identifier rubyid_gesture'>gesture</span>
  <span class='ivar'>@gesture</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="recognizer=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="recognizer-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>recognizer</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute recognizer</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


3
4
5</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 3</span>

<span class='kw'>def</span> <span class='id identifier rubyid_recognizer'>recognizer</span>
  <span class='ivar'>@recognizer</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="sdk_event_or_recognizer=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="sdk_event_or_recognizer-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>sdk_event_or_recognizer</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute sdk_event_or_recognizer</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


3
4
5</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 3</span>

<span class='kw'>def</span> <span class='id identifier rubyid_sdk_event_or_recognizer'>sdk_event_or_recognizer</span>
  <span class='ivar'>@sdk_event_or_recognizer</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="sender=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="sender-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>sender</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute sender</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


3
4
5</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 3</span>

<span class='kw'>def</span> <span class='id identifier rubyid_sender'>sender</span>
  <span class='ivar'>@sender</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="gesture?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>gesture?</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


62
63
64</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 62</span>

<span class='kw'>def</span> <span class='id identifier rubyid_gesture?'>gesture?</span>
  <span class='ivar'>@gesture</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="handle_gesture_or_event-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>handle_gesture_or_event</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


29
30
31
32
33
34
35
36
37
38</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 29</span>

<span class='kw'>def</span> <span class='id identifier rubyid_handle_gesture_or_event'>handle_gesture_or_event</span>
  <span class='kw'>case</span> <span class='ivar'>@block</span><span class='period'>.</span><span class='id identifier rubyid_arity'>arity</span>
  <span class='kw'>when</span> <span class='int'>2</span>
    <span class='ivar'>@block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='ivar'>@sender</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span>
  <span class='kw'>when</span> <span class='int'>1</span>
    <span class='ivar'>@block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='ivar'>@sender</span><span class='rparen'>)</span>
  <span class='kw'>else</span>
    <span class='ivar'>@block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="location-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>location</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68
69
70
71
72</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_location'>location</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_gesture?'>gesture?</span>
    <span class='ivar'>@recognizer</span><span class='period'>.</span><span class='id identifier rubyid_locationInView'>locationInView</span><span class='lparen'>(</span><span class='ivar'>@sender</span><span class='rparen'>)</span> 
  <span class='kw'>else</span>
    <span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_convertRect'>convertRect</span><span class='lparen'>(</span><span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_bounds'>bounds</span><span class='comma'>,</span> <span class='label'>toView:</span> <span class='kw'>nil</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_origin'>origin</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="location_in-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>location_in</strong>(view) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


74
75
76
77
78
79
80</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 74</span>

<span class='kw'>def</span> <span class='id identifier rubyid_location_in'>location_in</span><span class='lparen'>(</span><span class='id identifier rubyid_view'>view</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_gesture?'>gesture?</span>
    <span class='ivar'>@recognizer</span><span class='period'>.</span><span class='id identifier rubyid_locationInView'>locationInView</span><span class='lparen'>(</span><span class='id identifier rubyid_view'>view</span><span class='rparen'>)</span> 
  <span class='kw'>else</span>
    <span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_convertRect'>convertRect</span><span class='lparen'>(</span><span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_bounds'>bounds</span><span class='comma'>,</span> <span class='label'>toView:</span> <span class='id identifier rubyid_view'>view</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_origin'>origin</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="remove-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>remove</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


82
83
84
85
86
87
88
89
90</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 82</span>

<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span>
  <span class='kw'>if</span> <span class='ivar'>@sender</span>
    <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_gesture?'>gesture?</span>
      <span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_removeGestureRecognizer'>removeGestureRecognizer</span><span class='lparen'>(</span><span class='ivar'>@recognizer</span><span class='rparen'>)</span>
    <span class='kw'>else</span>
      <span class='ivar'>@sender</span><span class='period'>.</span><span class='id identifier rubyid_removeTarget'>removeTarget</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>action:</span> <span class='symbol'>:handle_gesture_or_event</span><span class='comma'>,</span> <span class='label'>forControlEvents:</span> <span class='ivar'>@sdk_event_or_recognizer</span><span class='rparen'>)</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="set_options-instance_method">
  
    - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>set_options</strong>(opts) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'motion/ruby_motion_query/event.rb', line 40</span>

<span class='kw'>def</span> <span class='id identifier rubyid_set_options'>set_options</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_gesture?'>gesture?</span>
    <span class='ivar'>@recognizer</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_cancelsTouchesInView'>cancelsTouchesInView</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:cancels_touches_in_view</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:cancels_touches_in_view</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_delegate'>delegate</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:delegate</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:delegate</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_numberOfTapsRequired'>numberOfTapsRequired</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:taps_required</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:taps_required</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_numberOfTouchesRequired'>numberOfTouchesRequired</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:fingers_required</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:fingers_required</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_maximumNumberOfTouches'>maximumNumberOfTouches</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:maximum_number_of_touches</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:maximum_number_of_touches</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_minimumNumberOfTouches'>minimumNumberOfTouches</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:minimum_number_of_touches</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:minimum_number_of_touches</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_allowableMovement'>allowableMovement</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:allowable_movement</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:allowable_movement</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_minimumPressDuration'>minimumPressDuration</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:minimum_press_duration</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:minimum_press_duration</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_direction'>direction</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:direction</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:direction</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_rotation'>rotation</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:rotation</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:rotation</span><span class='rparen'>)</span>
      <span class='id identifier rubyid_o'>o</span><span class='period'>.</span><span class='id identifier rubyid_scale'>scale</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:scale</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:scale</span><span class='rparen'>)</span>

      <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:init</span><span class='rparen'>)</span>
        <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:init</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='ivar'>@recognizer</span><span class='rparen'>)</span>
      <span class='kw'>end</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Sun Dec  8 20:15:51 2013 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.3 (ruby-1.9.3).
</div>

  </body>
</html>